<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        {{reverseMsg}}   
        {{reverseMsg}}   
        {{reverseMsg}}   
        {{reverseMsg}}   
        {{reverseMsg}}   
        {{reverseMsg}} 
        <br>
        {{reverseMsg1()}}  
        {{reverseMsg1()}}  
        {{reverseMsg1()}}  
        {{reverseMsg1()}}  
        {{reverseMsg1()}}  
        {{reverseMsg1()}}  
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'hello vue'
            },
            computed: {
                reverseMsg:{
                    get: function(){
                        console.log("计算属性：" + Date.now());
                        return this.msg.split("").reverse().join("");
                    }
                }
            },
            methods: {
                reverseMsg1(){
                    console.log("执行的是方法：" + Date.now());
                    return this.msg.split("").reverse().join("");
                }
            }
        })
    </script>
</body>
</html>